import { http } from '@/utils/http'
import type { RegisterData, UserInfo } from '@/types/auth'

export function register(registerData: RegisterData) {
  return http({
    method: 'POST',
    data: registerData,
    url: '/person/account/register',
  })
}

export function loginApi(phone: string, password: string) {
  return http<UserInfo>({
    method: 'POST',
    url: '/person/account/login?phone=' + phone + '&password=' + password,
  })
}
